package com.lyx.bookmanager.mapper;

import com.lyx.bookmanager.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {
    User getUserByUsername(String username);
    void changePassword(@Param("username") String username,@Param("newPassword") String newPassword);
    String getPassword(String username);

    boolean insert(@Param("username") String username, @Param("password") String password, @Param("role") String role);

    void addUser(User user);
}
